projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef8ce08
)
Optimize remove_child_area for children outside region
author
Alexander Larsson
<alexl@redhat.com>
Sun, 19 Jul 2009 20:35:25 +0000
(22:35 +0200)
committer
Alexander Larsson
<alexl@redhat.com>
Sun, 19 Jul 2009 20:38:06 +0000
(22:38 +0200)
If a child is totally outside the current region, bail early instead
of doing costly calculations to subtract the child region.
gdk/gdkwindow.c
patch
|
blob
|
history
diff --git
a/gdk/gdkwindow.c
b/gdk/gdkwindow.c
index eeb89325b3e1735ac614eb39767edfe89337de13..a1fa4505df7222669814658f990a1a302f932dbc 100644
(file)
--- a/
gdk/gdkwindow.c
+++ b/
gdk/gdkwindow.c
@@
-636,6
+636,10
@@
remove_child_area (GdkWindowObject *private,
r.width = child->width;
r.height = child->height;
+ /* Bail early if child totally outside region */
+ if (gdk_region_rect_in (region, &r) == GDK_OVERLAP_RECTANGLE_OUT)
+ continue;
+
child_region = gdk_region_rectangle (&r);
if (child->shape)